# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details

pkgname=python2-django-rest-framework
_pkgname=django-rest-framework
pkgver=0.1.0
pkgrel=2
epoch=1
pkgdesc='Awesome web-browsable Web APIs.'
arch=('any')
url='https://github.com/tomchristie/django-rest-framework'
license=('MIT')
options=(!emptydirs)
depends=('python2-django')
optdepends=('python2-pygments: Pygments support for API docs'
            'python2-markdown: Markdown support for the browsable API'
            'python2-django-crispy-forms: Improved HTML display for filtering'
            'python2-coreapi: Schema generation support')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('1b5a208f00fd8b53f30071e4dc76ceb36ed016ba5fc583f2ffc520ec13ac36211c1c3bc5ea9c15bdfc3f571975b0c0767d4483f1280273d9a5465f34f54c80f3')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package_python2-django-rest-framework() {

  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

